#ifndef TASKFRAME_H
#define TASKFRAME_H

#include <QFrame>
#include <QUuid>
#include <QDate>

#include "task.h"

namespace Ui {
    class Frame;
}

class TaskFrame : public QFrame
{
    Q_OBJECT

public:
    explicit TaskFrame(QFrame *parent = 0);
    ~TaskFrame();

    QUuid uuid() {return *task_uuid;}
    void setUuid( const QUuid &uuid );

    void setTaskStatus(TaskStatus status);

    void setLastExecDate(const QDate &date);

private:
    Ui::Frame *ui;
    QUuid     *task_uuid;

    void saveTask();
    void loadTask();

signals:
    //Task execution
    void changeTaskStatus(QUuid &uuid, TaskStatus status);

    //Task existance
    void duplicateTask(QUuid &uuid);
    void deleteTask(QUuid &uuid);

    //Input
    void manageTaskInput(QUuid &uuid);
    void viewTaskInput(QUuid &uuid);

    //Output
    void viewTaskOutput(QUuid &uuid);
};

#endif // TASKFRAME_H
